package com.supersit.GZFDA.activity;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.supersit.GZFDA.R;
import com.supersit.GZFDA.api.APIConstants;
import com.supersit.GZFDA.db.GZFDASqliteDBHelper;
import com.supersit.GZFDA.entity.UnUpLoad;

public class QueryRecord extends Activity {

	private Context context;
	private ImageView Iv_back;
	private WebView wv_browse;
	private GZFDASqliteDBHelper dbHelper;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_query_record);
		context = this;
		initView();
		listener();
		SharedPreferences sp = this.getSharedPreferences("userInfo",
				Context.MODE_WORLD_READABLE);
		String username = sp.getString("USER_NAME", "");
		String url = APIConstants.queryRecord + username;
		wv_browse.loadUrl(url);
	}

	private void initView() {
		Iv_back = (ImageView) findViewById(R.id.iv_back);
		wv_browse = (WebView) findViewById(R.id.wv_browse);
	}

	private void listener() {
		Iv_back.setOnClickListener(onClickListener);
	}

	private OnClickListener onClickListener = new OnClickListener() {

		@Override
		public void onClick(View arg0) {
			// TODO Auto-generated method stub
			switch (arg0.getId()) {
			case R.id.iv_back:
				finish();
				break;
			default:
				break;
			}
		}
	};
}
